package com.sky.config;

import com.sky.properties.AliOssProperties;
import com.sky.properties.BaiduProperties;
import com.sky.utils.AliOssUtil;
import com.sky.utils.BaiduUtil;
import com.sky.utils.HttpClientUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.client.HttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;
import java.util.HashMap;

@Configuration
@Slf4j
public class baiduConfiguration {

    @Bean
    public BaiduUtil baiduUtil(BaiduProperties baiduProperties) throws IOException {
        log.info("开始创建baidu地址对象",baiduProperties);
        BaiduUtil baiduUtil=new BaiduUtil(baiduProperties.getAddress(),baiduProperties.getAk(),baiduProperties.getOutput());
        return  baiduUtil;
    }
}
